{% extends 'pet_admin/base.html'%}

{% block main_body %}
<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        商品信息管理
        <small>幻兽商城后台</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
        <li class="active">商品信息管理</li>
    </ol>
</section>

<!-- Main content -->
<section class="content container-fluid">

    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <h2 class="box-title"><span class="glyphicon glyphicon-calendar" aria-hidden="true">添加商品信息</span>
                    </h2>
                </div>
                <!-- /.box-header -->
                <!-- form start -->
                <form class="form-horizontal" action="{% url 'admin_insert_good' %}" method="post"
                      enctype="multipart/form-data">
                    {% csrf_token %}
                    <div class="box-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商品名称：</label>

                            <div class="col-sm-4">
                                <input type="text" name="good_name" class="form-control" placeholder="请输入商品名称">
                            </div>
                        </div>
                    </div>

                    <div class="box-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商品类型：</label>

                            <div class="col-sm-4">
                                <select class="form-control" name="type_id">
                                    {% for type in good_type %}
                                    <option value="{{ type.type_id }}">{{ type.type_name }}</option>
                                    {% endfor %}
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">上传商品图片：</label>

                        <div class="col-sm-4">
                            <input type="file" name="good_path"/>
                        </div>
                    </div>

                    <div class="box-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商品单价：</label>

                            <div class="col-sm-4">
                                <input type="text" name="good_price" class="form-control" placeholder="请输入商品名称单价">
                            </div>
                        </div>
                    </div>

                    <div class="box-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">热销类型：</label>

                            <div class="col-sm-4">
                                &nbsp; &nbsp;
                                <input type="radio" name="good_hot" value="0" checked> 普通商品
                                &nbsp; &nbsp;
                                <input type="radio" name="good_hot" value="1"> 打折商品
                                &nbsp; &nbsp;
                                <input type="radio" name="good_hot" value="2"> 热销商品
                            </div>
                        </div>
                    </div>

                    <!-- /.box-body -->
                    <div class="box-footer">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" class="btn btn-primary">提交</button> &nbsp;
                            <button type="submit" class="btn btn-default">重置</button>
                        </div>
                    </div>
                    <!-- /.box-footer -->
                </form>
            </div>
            <!-- /.box -->
        </div>
    </div>

</section>
<!-- /.content -->
{% endblock %}